Skip to main content

Account

Base URL: https://wyzthscan.org/api

This API is provided for developers transitioning their applications from WYZth to BlockScout. It supports GET and POST requests.

Get Balance

Mimics WYZth JSON RPC's wy_getBalance. Returns the balance as of the provided block (defaults to latest).

?module=account
&action=wyz_get_balance
&address={addressHash}

Request

Query Parameter

ParameterDescription
ModuleA string with the name of the module to be invoked.

Must be set to: account | | Action | A string with the name of the action to be invoked.

Must be set to: wy_get_balance | | address | The address of the account. | | block | Either the block number as a string, or one of latest, earliest or pending latest will be the latest balance in a consensus block. earliest will be the first recorded balance for the address. pending will be the latest balance in consensus or nonconcensus blocks. |

Response

{
"id": 1,
"jsonrpc": "2.0",
"result": "0x0234c8a3397aab58"
}

Get Balance for a single address

Returns the Wyzth balance of a given address.

?module=account
&action=balance
&address={addressHash}

Request

Query Parameter

ParameterDescription
ModuleA string with the name of the module to be invoked.

Must be set to: account | | Action | A string with the name of the action to be invoked.

Must be set to: balance | | Address | A 160-bit code used for identifying Accounts. |

Responses

Code 200 (successful operation)

{
"message": "OK",
"result": "663046792267785498951364",
"status": "1"
}

Code 200 (error)

{
"message": "Invalid address hash",
"result": null,
"status": "0"
}

Get wyzth Balance for Multiple Addresses in a Single Call

Returns the balance of the accounts from a list of addresses.

?module=account
&action=balancemulti
&address={addressHash1,addressHash2,addressHash3}

Parameters

ParametersDescription
ModuleA string with the name of the module to be invoked.

Must be set to: account | | Action | A string with the name of the action to be invoked.

Must be set to: balancemulti | | address | A 160-bit code used for identifying Accounts. Separate addresses by comma.

Maximum of 20 addresses. |

Repsonses

Code 200 (successful operation)

{
"message": "OK",
"result": [
{
"account": "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
"balance": "40807168566070000000000",
"stale": true
},
{
"account": "0x63a9975ba31b0b9626b34300f7f627147df1f526",
"balance": "332567136222827062478",
"stale": false
},
{
"account": "0x198ef1ec325a96cc354c7266a038be8b5c558f67",
"balance": "185178830000000000",
"stale": false
}
],
"status": "1"
}

Code 200 (error)

{
"message": "Invalid address hash",
"result": null,
"status": "0"
}

Get pending transactions by address.

Returns the list of pending transactions performed by an address.

?module=account
&action=pendingtxlist
&address={addressHash}

Parameters

NameDescription
ModuleA string with the name of the module to be invoked.

Must be set to: account | | Action | A string with the name of the action to be invoked.

Must be set to: pendingtxlist | | address | A 160-bit code used for identifying Accounts. | | page | A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction. | | offset | A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction. |

Responses

Code 200 (successful opeartion)

{
"message": "OK",
"result": [
{
"contractAddress": "",
"cumulativeGasUsed": "122207",
"from": "0x3fb1cd2cd96c6d5c0b5eb3322d807b34482481d4",
"gas": "122261",
"gasPrice": "50000000000",
"gasUsed": "122207",
"hash": "0x98beb27135aa0a25650557005ad962919d6a278c4b3dde7f4f6a3a1e65aa746c",
"input": "0xf00d4b5d000000000000000000000000036c8cecce8d8bbf0831d840d7f29c9e3ddefa63000000000000000000000000c5a96db085dda36ffbe390f455315d30d6d3dc52",
"nonce": "0",
"to": "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae",
"value": "0"
}
],
"status": "1"
}

Code 200 (error)

{
"message": "No transactions found",
"result": [],
"status": "0"
}

Get internal transactions by address

Returns the list of internal transactions performed by an address, with optional pagination.

📝 Note : This API endpoint returns a maximum of 10,000 transactions only.

?module=accoun
t&action=txlistinternal
&txhash={transactionHash}

Parameters

NameDescription
Module*A string with the name of the module to be invoked.

Must be set to: account | | Action* | A string with the name of the action to be invoked.

Must be set to: txlistinternal | | txn hash* | Transaction hash of contents of the transaction. | | start block | the integer block number to start searching for transactions | | end block | the integer block number to end searching for transactions | | address | A 160-bit code used for identifying Accounts. | | page | A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction. | | offset | A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction. |

Responses

Code 200 (successful opeartion)

{
"message": "OK",
"result": [
{
"blockNumber": "6153702",
"contractAddress": "0x883103875d905c11f9ac7dacbfc16deb39655361",
"errCode": "",
"from": "0x2ca1e3f250f56f1761b9a52bc42db53986085eff",
"gas": "814937",
"gasUsed": "536262",
"index": "0",
"input": "",
"isError": "0",
"timeStamp": "1534362606",
"to": "",
"transactionHash": "0xd65b788c610949704a5f9aac2228c7c777434dfe11c863a12306f57fcbd8cdbb",
"type": "create",
"value": "5488334153118633"
}
],
"status": "1"
}

Code 200 (error)

{
"message": "No internal transactions found",
"result": [],
"status": "0"
}

Get token transfer events by address

Returns the list of WYZ-20 tokens transferred by an address, with optional filtering by token contract.

Usage:

  • WYZ-20 transfers from an address, specify the address parameter
  • WYZ-20 transfers from a contract address, specify the contract address parameter
  • WYZ-20 transfers from an address filtered by a token contract, specify both address and contract address parameters.
?module=account
&action=tokentx
&address={addressHash}

Parameters

NameDescription
Module*A string with the name of the module to be invoked.

Must be set to: account | | Action* | A string with the name of the action to be invoked.

Must be set to: tokentx | | address | A 160-bit code used for identifying Accounts. | | contract address | A 160-bit code used for identifying contracts. | | sort | A string representing the order by block number direction. Defaults to ascending order. Available values: asc, desc | | start block | the integer block number to start searching for transactions | | end block | the integer block number to end searching for transactions | | page | A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction. | | offset | A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction. |

Responses

Code 200 (successful operation)

{
"message": "OK",
"result": [
{
"blockHash": "0x6169c5dc05d0051564ba3eae8ebfbdefda640c5f5ffc095846b8aed0b44f64ea",
"blockNumber": "5997843",
"confirmations": "199384",
"contractAddress": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
"cumulativeGasUsed": "1043649",
"from": "0x4e83362442b8d1bec281594cea3050c8eb01311c",
"gas": "44758",
"gasPrice": "7000000000",
"gasUsed": "37298",
"hash": "0xd65b788c610949704a5f9aac2228c7c777434dfe11c863a12306f57fcbd8cdbb",
"input": "0xa9059cbb00000000000000000000000021e21ba085289f81a86921de890eed30f1ad23750000000000000000000000000000000000000000000000008ac7230489e80000",
"logIndex": "0",
"nonce": "765",
"timeStamp": "1532086946",
"to": "0x21e21ba085289f81a86921de890eed30f1ad2375",
"tokenDecimal": "18",
"tokenName": "Maker",
"tokenSymbol": "MKR",
"transactionIndex": "27",
"value": "10000000000000000000"
}
],
"status": "1"
}

Code 200 (error)

{
"message": "No token transfers found",
"result": [],
"status": "0"
}

Get token account balance for token contract address.

Returns the account balance of a specific contract address

?module=account
&action=tokenbalance
&contractaddress={contractAddressHash}
&address={addressHash}

Parameters

NameDescription
Module*A string with the name of the module to be invoked.

Must be set to: account | | Action* | A string with the name of the action to be invoked.

Must be set to: tokenbalance | | contractaddress* | A 160-bit code used for identifying contracts. | | address | A 160-bit code used for identifying accounts. |

Responses

Code 200 (operation successful)

{
"message": "OK",
"result": "135499",
"status": "1"
}

Code 200 (error)

{
"message": "Invalid address format",
"result": null,
"status": "0"
}

Get list of tokens owned by address

Returns a list of tokens hold by a specific address

?module=account
&action=tokenlist
&address={addressHash}

Parameter

NameDescription
Module*A string with the name of the module to be invoked.

Must be set to: account | | Action* | A string with the name of the action to be invoked.

Must be set to: tokenlist | | address | A 160-bit code used for identifying accounts. |

Responses

Code 200 (operation successful)

{
"message": "OK",
"result": [
{
"balance": "135499",
"contractAddress": "0x0000000000000000000000000000000000000000",
"decimals": "18",
"name": "Example Token",
"symbol": "ET",
"type": "WYZ-20"
},
{
"balance": "1",
"contractAddress": "0x0000000000000000000000000000000000000001",
"decimals": "18",
"name": "Example WYZ-721 Token",
"symbol": "ET7",
"type": "WYZ-721"
}
],
"status": "1"
}

Code 200 (error)

{
"message": "Invalid address format",
"result": null,
"status": "0"
}

Get list of blocks mined by address.

Returns the list of blocks mined by an address.

?module=account
&action=getminedblocks
&address={addressHash}

Parameters

NameDescription
Module*A string with the name of the module to be invoked.

Must be set to: account | | Action* | A string with the name of the action to be invoked.

Must be set to: getminedblock | | address* | A 160-bit code used for identifying Accounts. | | page | A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction. | | offset | A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction. |

Responses

Code 200 (operation successful)

{
"message": "OK",
"result": [
{
"blockNumber": "3462296",
"blockReward": "5194770940000000000",
"timeStamp": "1491118514"
}
],
"status": "1"
}

Code 200 (error)

{
"message": "No blocks found",
"result": [],
"status": "0"
}

Get a list of accounts and their balances.

Returns a list of account and their balances. Sorted in an ascending order by the time they were first seen by the explorer.

?module=account
&action=listaccounts

Parameters

NameDescription
Module*A string with the name of the module to be invoked.

Must be set to: account | | Action* | A string with the name of the action to be invoked.

Must be set to: listaccounts | | page | A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction. | | offset | A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction. |

Responses

Code 200 (successful)

{
"message": "OK",
"result": [
{
"address": "0x0000000000000000000000000000000000000000",
"balance": "135499"
}
],
"status": "1"
}